package com.bupt.chapter.second.analyze;

import java.math.BigInteger;

public class Solution {
	public static void main(String[] args) {
		getNum();
	}

	private static void getNum() {
		int[] num = new int[30];
		for (int i = 0; i < num.length; i++) {
			num[i] = i+2;
		}
			calculate(num, 123);
//		for (int i = 0; i < Integer.MAX_VALUE; i++) {
//			calculate(num, i);
//		}
	}

	private static void calculate(int[] num,int i) {
		int hit = 0;
		int hit1 = -1;
		int hit2 = -1;
		for (int j = 0; j < num.length&&hit<=2; j++) {
			if(i%num[j]!=0){
				hit++;
				if(hit==1){
					hit1 = j;
				}else if(hit ==2){
					hit2 = j;
				}else{
					break;
				}
			}
		}
		if(hit==2&&hit1+1==hit2){
			System.out.println(i);
		}
	}
}
